#pragma once

#include "Module.h"
#include "Singleton.h"

#include <list>

using namespace std;

/****************************************************
  Game engine class.
 ****************************************************/
class GameEngine : public Singleton
{
public:
        friend class Singleton;

        static std::string const * getClassName();

        // The following functions change the state of game engine
	void initialize();
	void start();
	void restart();
	void pause();
	void resume();
	void stop();
	void shutdown();

        // Add a module
	void addModule(Module *);
        // Remove a module by its key
	void removeModule(int);
        // Get a module by its key
	Module * getModule(int);

private:
	std::list<Module *> * _moduleList;

        GameEngine();
        ~GameEngine();
};
